Ext.define('CS.field.BaseField', {
	extend: 'CS.config.BaseConfig',
	requires: ['CS.plugin.FieldDataDeal', 'CS.plugin.FieldDomDeal'],

	transform: {
		clsName: 'className',
		clsParam: 'name',
		fieldLabel: 'label',
		multiSelect: 'multi'
	},

	defaultConfig: {
		labelAlign: 'right',
		multiSelect: false,
		needTextTpl: false,
		selectAll: false,
		width: 300
	},

	defaultPlugins: ['fielddatadeal', 'fielddomdeal'],

	initConfig: function(config) {
		config.xtype = 'field.' + config.fieldType;

		config.itemId = '';
		if (CS.isNotEmpty(config.clsName)) {
			config.itemId += config.clsName + '_';
		}
		config.itemId += config.clsParam;
	}

});
